package com.simou.dao;

import com.simou.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserMapper {
    User getUser(@Param("userCode") String userCode,@Param("userPassword") String userPassword);
    //根据条件查询用户          limit start,pageSize
    List<User> getUsersByLimit(@Param("start") int start,@Param("pageSize") int pageSize,@Param("queryUserRole") Long queryUserRole,@Param("queryName") String queryName);
    int getUsersCount(@Param("queryUserRole") Long queryUserRole,@Param("queryName") String queryName);

    int addUser(User user);

    int updateUser(@Param("uid") long uid,@Param("user")User user);

    int deleteUser(long uid);

}
